home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!g0tts.demon.co.uk
- From: Paul Bulmer <paul@g0tts.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Turning String contents to hex ???
- Date: Sun, 07 Apr 96 16:03:47 GMT
- Organization: Myorganisation
- Message-ID: <828893027snz@g0tts.demon.co.uk>
- Reply-To: paul@g0tts.demon.co.uk
- X-NNTP-Posting-Host: g0tts.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.30
- X-Mail2News-Path: g0tts.demon.co.uk
-
- Hi i have a slight problem and i have looked all over for the answer so please
- help if you can ....
-
- I have a routine that calculates hex codes for a eprom image and the end result
- is stored in a string called rx , now rx may hold the value B2C5 which is
- the hex code that the program has calculated but as soon as i save this to a
- file in binary mode (i need binary mode) it saves the value but as soon as i
- view this in hex mode i get the value in hex of b2c5 not 0B 02 0C 05 as i
- wanted , you may be thinking why convert to hex in the program then save it
- to a file the reason for this is the normal dcba order is wrong for my
- application if you look at dcba as the order of hex then i would need bcad as
- the order of hex. I want to keep my program ansi compatable also i am new to
- C programming so the answer is probably in front of me but just hasn't clicked.
-
-
-
- --
- Paul Bulmer
-